package homework1204;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;

public class SocketClient {
    public static void main(String[] args) throws IOException {
//        Socket socket = new Socket("10.11.149.196",8083);
        Socket socket = new Socket("127.0.0.1",5678);

        InputStream inputStream = socket.getInputStream();
        byte[] b = new byte[1000];
        int n = inputStream.read(b);
        System.out.println("message from " + new String(b,0,n));
        inputStream.close();
    }
}
